﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main_teacher.aspx.cs" Inherits="Main_teacher" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>教师界面</title>
    <style type="text/css">
        .auto-style1 {
            text-align: center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
        <br />
        我的消息<br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Cno" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" CssClass="auto-style1">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Cname" HeaderText="课程名" SortExpression="Cname" />
                <asp:BoundField DataField="Cno" HeaderText="课程号" ReadOnly="True" SortExpression="Cno" />
                <asp:BoundField DataField="category" HeaderText="类别" SortExpression="category" />
                <asp:BoundField DataField="priority_no" HeaderText="先修序号" SortExpression="priority_no" />
                <asp:BoundField DataField="credit" HeaderText="学分" SortExpression="credit" />
                <asp:BoundField DataField="term" HeaderText="学期" SortExpression="term" />
                <asp:BoundField DataField="address" HeaderText="上课地点" SortExpression="address" />
                <asp:BoundField DataField="time" HeaderText="时间" SortExpression="time" />
                <asp:BoundField DataField="introduce" HeaderText="介绍" SortExpression="introduce" />
                <asp:BoundField DataField="capacity" HeaderText="容量" SortExpression="capacity" />
                <asp:HyperLinkField DataNavigateUrlFields="Cno,Cname" DataNavigateUrlFormatString="entry_introduce.aspx?Cno={0}&amp;Cname={1}" HeaderText="输入课程介绍" Text="输入课程介绍" Target="_blank" />
                <asp:HyperLinkField DataNavigateUrlFields="Cno,Cname,category,priority_no,credit,term,address,time" DataNavigateUrlFormatString="teacher_update_course_detail.aspx?Cno={0}&amp;Cname={1}&amp;category={2}&amp;priority_no={3}&amp;credit={4}&amp;term={5}&amp;address={6}&amp;time={7}" HeaderText="更新" Text="更新" Target="_blank" />
                <asp:HyperLinkField DataNavigateUrlFields="Cno,Cname" DataNavigateUrlFormatString="upload.aspx?Cno={0}&amp;Cname={1}" HeaderText="上传课件" Text="上传" Target="_blank" />
                <asp:HyperLinkField DataNavigateUrlFields="Cno" DataNavigateUrlFormatString="list.aspx?Cno={0}" HeaderText="中签名单/录入成绩/发送消息" Text="名单" Target="_blank"/>
                <asp:HyperLinkField DataNavigateUrlFields="Cno,Cname" DataNavigateUrlFormatString="census_score.aspx?Cno={0}&amp;Cname={1}" HeaderText="成绩统计" Text="统计" Target="_blank"></asp:HyperLinkField>
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
        </center>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="SELECT [Cname], [Cno], [category], [priority_no], [credit], [term], [address], [time], [introduce], [capacity] FROM [Course],[Teacher]
where Course.teacher=Teacher.Tname and Teacher.Tno=@Tno">
            <SelectParameters>
                <asp:SessionParameter Name="Tno" SessionField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
